package com.eliasbalasis.dwr4gwt.client;

import com.google.gwt.core.client.JavaScriptException;

public abstract class DwrException {
	private String message;
	private JavaScriptException exception;

	DwrException() {
	}

	public String getMessage() {
		return message;
	}
	void setMessage(String message) {
		this.message = message;
	}

	public JavaScriptException getException() {
		return exception;
	}
	void setException(JavaScriptException exception) {
		this.exception = exception;
	}

	public String toString() {
		String s = "Message : "+getMessage()+"\n\n";
		if (getException()!=null) {
			s += "Exception : "+getException().toString();
		}
		return s;
	}

}
